<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>My Project: E:/!代码工厂/3D引擎/engine_terrain.cpp 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_1156a89e522bba50a2971fe896a0c15e.html">!代码工厂</a></li><li class="navelem"><a class="el" href="dir_64066445c3883bf8de1933e8bad1a394.html">3D引擎</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">engine_terrain.cpp 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="engine__terrain_8h_source.html">engine_terrain.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="c_camera_v1_8h_source.html">cCameraV1.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:afc9ddf20c03df6b92ae1a49a4cfc495a"><td class="memItemLeft" align="right" valign="top">UINT *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="engine__terrain_8cpp.html#afc9ddf20c03df6b92ae1a49a4cfc495a">init_terrain</a> (IDirect3DDevice9 *pDevice, char *file_name, <a class="el" href="struct_terrain.html">Terrain</a> &amp;terrain_map, IDirect3DIndexBuffer9 **vertexIndexBuff, IDirect3DVertexBuffer9 **vertexBuff, IDirect3DTexture9 **tex)</td></tr>
<tr class="memitem:a5db2a6b0ae48e0a00b151b3983b835fe"><td class="memItemLeft" align="right" valign="top">UCHAR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="engine__terrain_8cpp.html#a5db2a6b0ae48e0a00b151b3983b835fe">terrain_read_heightmap</a> (TCHAR *file_name, int num_terrain_vertex)</td></tr>
<tr class="memitem:aae6e4d934c4e6a30b9d97886a6f50493"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="engine__terrain_8cpp.html#aae6e4d934c4e6a30b9d97886a6f50493">terrain_get_heightmap_value</a> (<a class="el" href="struct_terrain.html">Terrain</a> &amp;map1, UINT *heightmap, int i, int j)</td></tr>
<tr class="memitem:a40631fd52bc2d6307b0b6979c67a4f1c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="engine__terrain_8cpp.html#a40631fd52bc2d6307b0b6979c67a4f1c">terrain_set_heightmap_value</a> (<a class="el" href="struct_terrain.html">Terrain</a> &amp;map1, UINT *heightmap, int i, int j, int value)</td></tr>
<tr class="memitem:ae85707fd64bc55da7d360da8f064b917"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="engine__terrain_8cpp.html#ae85707fd64bc55da7d360da8f064b917">terrain_compute_vertex_light</a> (<a class="el" href="struct_terrain.html">Terrain</a> &amp;map1, UINT *heightmap, int i, int j, D3DXVECTOR3 direction_light)</td></tr>
<tr class="memitem:ab8831f27840e3220072c58a86c090f3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="engine__terrain_8cpp.html#ab8831f27840e3220072c58a86c090f3b">terrain_init_vertex_index</a> (IDirect3DDevice9 *pDevice, IDirect3DIndexBuffer9 **ib, <a class="el" href="struct_terrain.html">Terrain</a> &amp;map1)</td></tr>
<tr class="memitem:a99884d8768968f955132f819840f1d65"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="engine__terrain_8cpp.html#a99884d8768968f955132f819840f1d65">terrain_get_height</a> (<a class="el" href="struct_terrain.html">Terrain</a> &amp;map1, UINT *heightmap, float x, float z)</td></tr>
</table>
<hr/><h2>函数说明</h2>
<a class="anchor" id="afc9ddf20c03df6b92ae1a49a4cfc495a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT* init_terrain </td>
          <td>(</td>
          <td class="paramtype">IDirect3DDevice9 *&#160;</td>
          <td class="paramname"><em>pDevice</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>file_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_terrain.html">Terrain</a> &amp;&#160;</td>
          <td class="paramname"><em>terrain_map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IDirect3DIndexBuffer9 **&#160;</td>
          <td class="paramname"><em>vertexIndexBuff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IDirect3DVertexBuffer9 **&#160;</td>
          <td class="paramname"><em>vertexBuff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IDirect3DTexture9 **&#160;</td>
          <td class="paramname"><em>tex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ae85707fd64bc55da7d360da8f064b917"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float terrain_compute_vertex_light </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_terrain.html">Terrain</a> &amp;&#160;</td>
          <td class="paramname"><em>map1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINT *&#160;</td>
          <td class="paramname"><em>heightmap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>j</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D3DXVECTOR3&#160;</td>
          <td class="paramname"><em>direction_light</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a99884d8768968f955132f819840f1d65"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float terrain_get_height </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_terrain.html">Terrain</a> &amp;&#160;</td>
          <td class="paramname"><em>map1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINT *&#160;</td>
          <td class="paramname"><em>heightmap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aae6e4d934c4e6a30b9d97886a6f50493"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int terrain_get_heightmap_value </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_terrain.html">Terrain</a> &amp;&#160;</td>
          <td class="paramname"><em>map1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINT *&#160;</td>
          <td class="paramname"><em>heightmap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ab8831f27840e3220072c58a86c090f3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void terrain_init_vertex_index </td>
          <td>(</td>
          <td class="paramtype">IDirect3DDevice9 *&#160;</td>
          <td class="paramname"><em>pDevice</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IDirect3DIndexBuffer9 **&#160;</td>
          <td class="paramname"><em>ib</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_terrain.html">Terrain</a> &amp;&#160;</td>
          <td class="paramname"><em>map1</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a5db2a6b0ae48e0a00b151b3983b835fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UCHAR* terrain_read_heightmap </td>
          <td>(</td>
          <td class="paramtype">TCHAR *&#160;</td>
          <td class="paramname"><em>file_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_terrain_vertex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a40631fd52bc2d6307b0b6979c67a4f1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void terrain_set_heightmap_value </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_terrain.html">Terrain</a> &amp;&#160;</td>
          <td class="paramname"><em>map1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINT *&#160;</td>
          <td class="paramname"><em>heightmap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>j</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2012年 五月 25日 星期五 18:27:12 , 为 My Project使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1
</small></address>
</body>
</html>
